package com.example.evennews.model

import com.example.evennews.bean.NewsDetail
import com.example.evennews.bean.NewsDetailResponse
import com.example.evennews.bean.NewsDigest
import com.example.evennews.bean.NewsDigestResponse
import com.example.evennews.bean.NewsType
import com.example.evennews.bean.NewsTypeResponse
import okhttp3.ResponseBody
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query

interface NewsService {

    @GET("/api/news/types/v2")
    fun getNewsType(
        @Query("app_id") apiId: String,
        @Query("app_secret") apiSecret: String
    ): Call<NewsTypeResponse>

    @GET("/api/news/list/v2")
    fun getNewsDigest(
        @Query("typeId") typeId: String,
        @Query("page") page: Int,
        @Query("app_id") apiId: String,
        @Query("app_secret") apiSecret: String
    ): Call<NewsDigestResponse>

    @GET("/api/news/details/v2")
    fun getNewsDetail(
        @Query("newsId")newsId: String,
        @Query("app_id")apiId: String,
        @Query("app_secret")apiSecret: String
    ): Call<NewsDetailResponse>
}